﻿<%@ Page Language="C#" MasterPageFile="~/admin/Admin.master" AutoEventWireup="true" CodeFile="HienthiHSX.aspx.cs" Inherits="admin_HienthiHSX" Title="Untitled Page" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">

<script type="text/javascript">
    function isconfirm() {
        var ck = confirm('Bạn có chắc xoá hay không?');
        if (ck == true)
            return true;
        else
            return false;
    }

        </script>
    <form id="form1" runat="server">
    <table style="width: 87%; height: 32px;">
        <tr>
            <td>
            
            <table border="1" width="600">
            
                <asp:Repeater ID="Repeater1" runat="server" DataSourceID="SqlDataSource1" 
                    onitemcommand="Repeater1_ItemCommand">
                <HeaderTemplate>
                <tr>
                            <th align=center>Mã Hãng SX</th>
							<th align=center>Tên Hãng SX</th>
							<th align=center>Quốc Gia</th>
							<th align=center>Liên Hệ</th>
							<th align=center>Logo</th>				
                            <th align=center>Xoá</th>				
                              <th align=center>Sửa</th>				
                </tr>
                </HeaderTemplate>
                
                <ItemTemplate>
                <tr>
                            <td align="center"><asp:HyperLink ID="hplMaHSX" runat="server" NavigateUrl='<%# "~/ThemNSX.aspx?mahangsx=" + DataBinder.Eval(Container.DataItem,"mahangsx")%>' Text='<%# DataBinder.Eval(Container.DataItem,"mahangsx")%>' /></td>
							<td align="left"><%#Eval("TenHang")%></td>
							<td align="left"><%#Eval("QuocGia")%></td>
							<td align="left"><%#Eval("LienHe")%></td>
							<td align="center"><%#Eval("Logo")%></td>							
							<td align="center"><asp:ImageButton ID="imagebtxoa" runat="server" CommandArgument='dk' CommandName="Xoa" OnClientClick='return isconfirm()'
            ImageUrl="images/action_remove.png" /></td>
                <td align="center">  <a href="SuaNSX.aspx?mahangsx=<%#Eval("mahangsx")%>"><img src="images/action_check.png"  alt ="Check" id ="check" /></a> </td>
                
                </tr>
                
                
                </ItemTemplate>
                </asp:Repeater>
           </table>
                <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
                    ConnectionString="<%$ ConnectionStrings:maytinhxachtayConnectionString %>" 
                    SelectCommand="SELECT [MaHangSX], [TenHang], [QuocGia], [LienHe], [Logo] FROM [HangSX]">
                </asp:SqlDataSource>
            </td>
            <td>
                &nbsp;</td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td>
                <asp:Repeater ID="Repeater2" runat="server">
                </asp:Repeater>
                </td>
            <td>
                </td>
            <td>
                </td>
        </tr>
        </table>
    </form>
</asp:Content>

